home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enigma Amiga Life 112
/
EnigmaAmiga112CD.iso
/
dalla rivista
/
workbench
/
freedom
/
docs
/
install truetype font
< prev
next >
Wrap
Text File
|
1998-07-16
|
5KB
|
130 lines
This script allows you to install one or more TrueType fonts.
Installing an outline font to be used by a standard OS font engine (such
as bullet.library for Compugraphic Fonts and freedom.library for TrueType
fonts) means doing the following things (the script will do it for you):
o Create "<fontname>.font" in FONTS: This 4 byte long file gets a special
ID telling the OS that this is not a standard Amiga bitmap font but one
to be used with a font engine (library). Information on what engine has
to be used with this font and more can be retrieved from the ".otag"
file:
o Create "<fontname>.otag" in FONTS: This file contains a lot of info
about the outline font, most importantly which engine (library) to
use with it. Among that most of the stuff in the .otag file is only
needed by diskfont.library.
o Copy the real font file (in the case of TrueType fonts the ".ttf" or
".ttc" file) to any place. This depends on the font engine. Usually
the .otag file created by the Font Manager or Font Installation script
(in the case of Freedom) saves the full path of the font in the otag
file.
This installation script is actually not clever enough to find out all
information itself. Therefore you will be prompted for the missing things.
If you don't know what to enter, accept what you get as default in the
string gadget.
You will be asked for:
o YSizeFactor High and YSizeFactor Low:
This two form a ratio (YSizeFactor High/YSizeFactor Low) telling
diskfont.library (I think) how to "convert Amiga pixel height specifica-
tion, which describes the distance from the lowest descender to the
highest ascender, into a point size specification, which is related
(via YSizeFactor) to a nominal character height"
As far as I have understood it this should be something like this:
************************ -------+
* * |
* oooooo ------------ * ------ | -----+
* oo * | |
* oo ooooo * | |
* oo oo oo * "A" "B"
* oo ooooo * | |
* o * | |
* o o * | |
* ooo --- * ------ | -----+
* * |
************************ -------+
So the ratio would be B / A. For example if B = 6 and A = 10 then we could
use one of the following values for YSizeFactorHigh and YSizeFactor low
(all with the same result, only the ratio counts):
High: 6 Low: 10
High: 12 Low: 24
High: 12000 Low: 20000
Both values must match into 16 Bit so don't use values bigger than 32767!!
I have tried to look at some fonts to find out what "B" (lowest descender
to highest ascender) they have and I noticed in some of them "B" is higher
than "A". I have not tried out if it's OK for diskfont.library (and other
programs?) to have such a ratio (> 1.0) therefore actually you are asked
to enter this values manually. For now I suggest you to either accept the
default values (High=8782 and Low=10034 --> ratio = 0.875224) or to set
both High and Low to the same value. How good it looks will depend on the
font also (I guess).
o SpaceWidth:
Width of the space character in fraction of an EM . Probably used by disk-
font.library only. Don't know much more. Accept the default value for now.
o Sizes to be displayed in ASL requesters:
Nothing to explain apart from the fact, that this are *not* the only sizes
you will be able to use with diskfont.library - these should be the usual
sizes you are going to use with this font. You will be able to use the
font at any size by typing in the desired size manually in ASL requesters.
o Whether the font to be installed has serifs or not:
There *is* some information about that in the truetype file, but it's
not defined as BOOL (YES or NO), instead it is a value which defines
the "grade of serif-ness". I know what each possible value means in
words - I have the truetype specification - but I don't know where to
put the "step from IS_SERIF to IS_NOT_SERIF".
To speed up installation of fonts, it's possible to define standard
values (you won't be asked by the script anymore) for:
YSizeFactorHigh
YSizeFactorLow
SpaceWidth
AvailSizes
All you have to do is set the relative tooltypes in the script's icon.
For example:
YSIZEFACTORHIGH=10000
YSIZEFACTORLOW=10000
SPACEWIDTH=0.88
AVAILSIZES=10 20 30 40 50 60
Final Notes:
============
o The script is not yet able to detect a reverse italic font.
o You can install fonts by hand (= Shell) by using the utilities in the
"Tools" directory. See "Tools" doc.
o If the font character spacing is wrong (the glyphs (= letters) overlap)
when using a font with diskfont.library re-install the font and change
SpaceWidth!